<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class ArticleController extends Controller
{
    /**
     * showdoc
     * @catalog 文章
     * @title 获取文章列表
     * @description 获取文章列表
     * @method get
     * @url  https://blog.yezt88.com/api/v1/article/list
     * @param
     * @return {"error":0,"msg":"","data":{"article_title_list":[{"id":"1","acticle_id":"1","content":"\u6b63\u5219\u8868\u8fbe\u5f0f\u524d\u9762\u662f~\u7528\u4e8e\u533a\u5206\u5927\u5c0f\u5199\u5339\u914d\r\nlocation ~ \\.html? {\n ...\n}\r\n\u8981\u67e5\u627e\u4e0eURI\u6700\u5339\u914d\u7684\u4f4d\u7f6e\uff0cNGINX Plus\u9996\u5148\u5c06URI\u4e0e\u5177\u6709\u524d\u7f00\u5b57\u7b26\u4e32\u7684\u4f4d\u7f6e\u8fdb\u884c\u6bd4\u8f83\u3002\u7136\u540e\uff0c\u5b83\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u641c\u7d22\u4f4d\u7f6e\u3002\r\n\u9664\u975e\u4f7f\u7528^~\u4fee\u9970\u7b26\uff0c\u5426\u5219\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u4f18\u5148\u7ea7\u66f4\u9ad8\u3002\u5728\u524d\u7f00\u5b57\u7b26\u4e32NGINX Plus\u4e2d\u9009\u62e9\u6700\u5177\u4f53\u7684\u4e00\u4e2a\uff08\u5373\u6700\u957f\u548c\u6700\u5b8c\u6574\u7684\u5b57\u7b26\u4e32\uff09\u3002\u9009\u62e9\u5904\u7406\u8bf7\u6c42\u7684\u4f4d\u7f6e\u7684\u786e\u5207\u903b\u8f91\u5982\u4e0b","title":"\u7f51\u7edc\u670d\u52a1\u5668-web\u670d\u52a1\u5668","user_id":"1","create_time":"2018-12-04 13:47:45","read_num":"2416","like":"1012","type":"main","image_url":"images\/toppic01.jpg","source":"LINUX","name":"yzt","source_name":"Linux\u6559\u7a0b"},{"id":"2","acticle_id":"2","content":"\u5b89\u5168\u662f\u4ec0\u4e48\r\n\u6240\u8c13\u7684\u5b89\u5168\uff0c\u5927\u4f53\u53ef\u4ee5\u7406\u89e3\u4e3a\u901a\u8fc7\u4e00\u4e2a\u5b89\u5168\u7684\u68c0\u67e5\uff08\u8fc7\u6ee4\u6216\u8005\u51c0\u5316\uff09\u7684\u8fc7\u7a0b\uff0c\u68b3\u7406\u51fa\u672a\u77e5\u7684\u4eba\u548c\u7269\uff0c\u4f7f\u5176\u53d8\u5f97\u53ef\u4ee5\u4fe1\u4efb\u3002\u5c31\u50cf\u53e4\u4ee3\u7684\u57ce\u95e8\u68c0\u67e5\uff0c\u73b0\u4eca\u7684\u673a\u573a\u5b89\u68c0\uff0c\u5c31\u662f\u8fc7\u6ee4\u6392\u9664\u4e00\u4e9b\u5371\u9669\u7684\u4eba\u548c\u7269\u54c1\uff1b\u5982\u679c\u6309\u7167\u4fe1\u4efb\u7684\u7a0b\u5ea6\u5212\u5206\u7b49\u7ea7\uff0c\u90a3\u4e48\u5f80\u5f80\u9ad8\u7b49\u7ea7\u7684\u4fe1\u4efb\u533a\u57df\u6d41\u5411\u4f4e\u7b49\u4fe1\u4efb\u533a\u57df\u662f\u4e0d\u9700\u8981\u7ecf\u8fc7\u68c0\u67e5\u7684\uff0c\u800c\u4ece\u4f4e\u7b49\u533a\u57df\u6d41\u5411\u9ad8\u7b49\u533a\u57df\uff0c\u57fa\u672c\u5c31\u9700\u4fe1\u4efb\u8fb9\u754c\u7684\u68c0\u67e5\uff08 (\u00b4\u25bd\uff40)\u8d70\u8fc7\u90a3\u6247\u95e8\uff0c\u4ece\u6b64\u8863\u670d\u662f\u8def\u4eba \uff09\u3002","title":"\u6d45\u8c08\u4fe1\u606f\u5b89\u5168","user_id":"1","create_time":"2018-12-04 14:14:25","read_num":"13620","like":"795","type":"main","image_url":"images\/toppic01.jpg","source":"SECURITY","name":"yzt","source_name":"\u4fe1\u606f\u5b89\u5168"},{"id":"3","acticle_id":"3","content":"\u4e0b\u8f7d\u5e76\u5b89\u88c5Eralng OTP For Windows\uff08erlang\u7684\u73af\u5883\uff09\r\n\r\n\u4e0b\u8f7d\u5e76\u5b89\u88c5Rabbit MQ Server Windows\r\n\r\n\u4e0b\u8f7dMQ Go\u7684\u4f9d\u8d56\r\n\r\n2.\u914d\u7f6eRabbitMQ\r\n\r\n\u5b9a\u4f4d\u5230rabbitmq\u7684\u5b89\u88c5\u8def\u5f84\uff08\u56fe1-1\uff09","title":"\u57fa\u4e8ewindows\u7684\u6d88\u606f\u670d\u52a1\u961f\u5217RabbitMQ(GO\u5b9e\u73b0\u65b9\u5f0f)","user_id":"1","create_time":"2018-12-12 09:34:56","read_num":"1183","like":"45","type":"main","image_url":"images\/golang.jpg","source":"GOLANG","name":"yzt","source_name":"Golang\u7b14\u8bb0"},{"id":"4","acticle_id":"4","content":"\u4ece\u5e93\u751f\u6210\u4e24\u4e2a\u7ebf\u7a0b\uff0c\u4e00\u4e2aI\/O\u7ebf\u7a0b\uff0c\u4e00\u4e2aSQL\u7ebf\u7a0b\uff1b\r\ni\/o\u7ebf\u7a0b\u53bb\u8bf7\u6c42\u4e3b\u5e93 \u7684binlog\uff0c\u5e76\u5c06\u5f97\u5230\u7684binlog\u65e5\u5fd7\u5199\u5230relay log\uff08\u4e2d\u7ee7\u65e5\u5fd7\uff09 \u6587\u4ef6\u4e2d\uff1b\r\n\u4e3b\u5e93\u4f1a\u751f\u6210\u4e00\u4e2a log dump \u7ebf\u7a0b\uff0c\u7528\u6765\u7ed9\u4ece\u5e93 i\/o\u7ebf\u7a0b\u4f20binlog\uff1b\r\nSQL \u7ebf\u7a0b\uff0c\u4f1a\u8bfb\u53d6relay log\u6587\u4ef6\u4e2d\u7684\u65e5\u5fd7\uff0c\u5e76\u89e3\u6790\u6210\u5177\u4f53\u64cd\u4f5c\uff0c\u6765\u5b9e\u73b0\u4e3b\u4ece\u7684\u64cd\u4f5c\u4e00\u81f4\uff0c\u800c\u6700\u7ec8\u6570\u636e\u4e00\u81f4\uff1b","title":"mysql\u9ad8\u53ef\u7528\u6027\u4e4b\u4e3b\u4ece\u590d\u5236","user_id":"1","create_time":"2018-12-12 10:03:26","read_num":"1256","like":"15","type":"main","image_url":"images\/mysql.jpg","source":"MYSQL","name":"yzt","source_name":"Mysql\u7b14\u8bb0"}]}}
     * @return_param article_title_list object 文章列表
     * @return_param id int 文章标题ID
     * @return_param acticle_id int 文章id
     * @return_param content string 文章内容
     * @return_param create_time string 创建时间
     * @return_param image_url string 图片url
     * @return_param like string 点赞数量
     * @return_param name string 作者
     * @return_param read_num string 阅读量
     * @return_param source string 来源
     * @return_param source_name string 来源描述
     * @return_param title string 文章标题
     * @return_param type string 类型
     * @return_param user_id int 用户ID
     * @remark 这里是备注信息
     * @number 2
     */

    public function getArticle()
    {
        $article_title_list = $this->_articleService->getArticleTitle('main');
        $data['article_title_list'] = $article_title_list;
        return $this->success($data);
    }
}
